/*
 * @Author: yanjikun
 * @Date: 2022-04-22 11:05:39
 * @LastEditors: yanjikun
 * @LastEditTime: 2022-04-24 10:55:35
 * @Description: file content
 */

import { ModalFuncProps } from 'ant-design-vue'
import { ButtonProps } from 'ant-design-vue/es/button'
import { ColumnParams } from './column'

export interface ActionItem extends Omit<ButtonProps, 'onClick'> {
  onClick?: Fn<ColumnParams, any>
  label?: string
  icon?: string
  modalConfirm?: ModalConfirm
  /**业务控制是否隐藏 */
  hidden?: boolean | ((action: ActionItem) => boolean)
}

export type ModalConfirm = ModalFuncProps & {
  onOk?: Fn<ColumnParams, any>
  onCancel?: Fn<ColumnParams, any>
}
